
public class Utility
{
   public static boolean isPalinDrome(String aString)
   {
      aString = aString.toLowerCase();
      boolean result = true;
      if(aString.length()==0||aString.length()==1)
      {
         return true;
      }
      else if(!Character.isLetter(aString.charAt(0)))
      {
         return isPalinDrome(aString.substring(1));
      }
      else if(!Character.isLetter(aString.charAt(aString.length()-1)))
      {
         return isPalinDrome(aString.substring(0,aString.length()-1));
      }
      else if(aString.charAt(0)==aString.charAt(aString.length()-1))
      {
         result = result && isPalinDrome(aString.substring(1, aString.length()-2));
      }
      else
      {
         return false;
      }
      return result;
   }
}
